//
//  AppDelegate.h
//  LocomotiveGuards
//
//  Created by apple on 15/11/9.
//  Copyright (c) 2015年 REDOOR. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "AFNetworking.h"

@interface AppDelegate : UIResponder <UIApplicationDelegate>

@property (strong, nonatomic) UIWindow *window;

-(AFHTTPRequestOperationManager *)shareHTTPRequestOperationManager;

-(void)changeRootviewcontroller;

// 发起网络请求
-(void)GenerateHTTPRequestWithUrl:(NSString *)urlstring
                        withParam:(NSDictionary*)parameterDic
                        success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success
                        failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure;

- (void)UploadHTTPRequestWithUrl:(NSString *)url
                       withParam:(NSDictionary*)parameterDic
       constructingBodyWithBlock:(void (^)(id<AFMultipartFormData> formData))block
                         success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success
                         failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure;

//- (void)UploadHTTPRequestWithUrl:(NSString *)url
//                       withParam:(NSDictionary*)parameterDic
//       constructingBodyWithBlock:(void (^)(id<AFMultipartFormData> formData))block
//                         success:(void (^)(AFHTTPRequestOperation *operation, id responseObject))success
//                         failure:(void (^)(AFHTTPRequestOperation *operation, NSError *error))failure;

@end

